package org.easy.tool.controller;

import org.easy.tool.common.R;
import org.easy.tool.service.ICompany;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.LinkedHashMap;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Valley
 * @since 2024-02-27 20:20:11
 */
@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    ICompany companyService;


    /**
     * 功能：
     */
    @RequestMapping("refreshSimple")
    public R refreshSimple() {
        try {
            List<LinkedHashMap> dataMap = companyService.refreshData();
            return R.ok(dataMap);
        }catch (Exception e){
            return R.fail(e.getMessage());
        }
    }





}
